package com.team1.system.librarybook.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.team1.system.librarybook.mapper.LibraryBookMapper;
import com.team1.system.librarybook.domain.LibraryBook;
import com.team1.system.librarybook.service.ILibraryBookService;

/**
 * 图书管理Service业务层处理
 * 
 * @author hyy
 * @date 2023-04-09
 */
@Service
public class LibraryBookServiceImpl implements ILibraryBookService 
{
    @Autowired
    private LibraryBookMapper libraryBookMapper;

    /**
     * 查询图书管理
     * 
     * @param bookId 图书管理主键
     * @return 图书管理
     */
    @Override
    public LibraryBook selectLibraryBookByBookId(Long bookId)
    {
        return libraryBookMapper.selectLibraryBookByBookId(bookId);
    }

    /**
     * 查询图书管理列表
     * 
     * @param libraryBook 图书管理
     * @return 图书管理
     */
    @Override
    public List<LibraryBook> selectLibraryBookList(LibraryBook libraryBook)
    {
        return libraryBookMapper.selectLibraryBookList(libraryBook);
    }

    /**
     * 新增图书管理
     * 
     * @param libraryBook 图书管理
     * @return 结果
     */
    @Override
    public int insertLibraryBook(LibraryBook libraryBook)
    {
        return libraryBookMapper.insertLibraryBook(libraryBook);
    }

    /**
     * 修改图书管理
     * 
     * @param libraryBook 图书管理
     * @return 结果
     */
    @Override
    public int updateLibraryBook(LibraryBook libraryBook)
    {
        return libraryBookMapper.updateLibraryBook(libraryBook);
    }

    /**
     * 批量删除图书管理
     * 
     * @param bookIds 需要删除的图书管理主键
     * @return 结果
     */
    @Override
    public int deleteLibraryBookByBookIds(Long[] bookIds)
    {
        return libraryBookMapper.deleteLibraryBookByBookIds(bookIds);
    }

    /**
     * 删除图书管理信息
     * 
     * @param bookId 图书管理主键
     * @return 结果
     */
    @Override
    public int deleteLibraryBookByBookId(Long bookId)
    {
        return libraryBookMapper.deleteLibraryBookByBookId(bookId);
    }
}
